package com.woniuxy.company5.controller;


import com.woniuxy.company5.entity.RepFeedback;
import com.woniuxy.company5.service.RepFeedbackService;
import com.woniuxy.company5.util.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/repFeedback")
public class RepFeedbackController {
    @Resource
    private RepFeedbackService repFeedbackService;
    @PostMapping("add1")
    public Result add1(@RequestBody RepFeedback repFeedback){
        repFeedback.setSuccessful(2);
        repFeedback.setAudit(1);
        repFeedbackService.insertSelective(repFeedback);
        return Result.ok();
    }
    @PostMapping("add2")
    public Result add2(@RequestBody RepFeedback repFeedback){
        repFeedback.setSuccessful(2);
        repFeedback.setAudit(1);
        repFeedbackService.add2(repFeedback);
        return Result.ok();
    }
    @PostMapping("add3")
    public Result add3(@RequestBody RepFeedback repFeedback){
        repFeedback.setSuccessful(1);
        repFeedback.setAudit(1);
        repFeedback.setDesc1("无");
        repFeedback.setProblemId(999);
        repFeedbackService.add3(repFeedback);
        return Result.ok();
    }

}
